#ifndef __TESTFACTORY__H__
#define __TESTFACTORY__H__

#if _MSC_VER > 1000
#pragma once
#endif

#include "test.h"

using namespace AllTing;

namespace AllTing
{

namespace Test
{

class TestFactory
{
public:
	static TestFactory* Instance();
	
	Test* Create(::Func func, const Char* pszName, const Bool bSelect=true, const Bool bStopOnFailed=false);
	Test* Create(Testable* pTestee, Testable::Testee testee, const Char* pszName, const Bool bSelect=true, const Bool bStopOnFailed=false);
	void Destroy();

	UInt32 Size() const
	{
		return (UInt32)theTests_.size();
	}

	TestConstIterator BeginTest() const;
	TestConstIterator EndTest() const;

	~TestFactory();

protected:
	TestFactory(){}

	Tests theTests_;
};

}	//namespace Test

}	//namespace AllTing

#endif